package com.ruogu.codegeneration.model.vo.chathistory;

import com.ruogu.codegeneration.model.vo.user.UserVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 对话历史视图对象
 *
 * @author ruogu
 */
@Data
@Schema(description = "对话历史视图对象")
public class ChatHistoryVO implements Serializable {

    /**
     * id
     */
    @Schema(description = "对话历史ID", example = "1")
    private Long id;

    /**
     * 消息内容
     */
    @Schema(description = "消息内容", example = "Hello, AI!")
    private String message;

    /**
     * 消息类型
     */
    @Schema(description = "消息类型", example = "user")
    private String messageType;

    /**
     * 错误信息
     */
    @Schema(description = "错误信息", example = "API 调用失败")
    private String errorMessage;

    /**
     * 应用ID
     */
    @Schema(description = "应用ID", example = "1")
    private Long appId;

    /**
     * 创建用户ID
     */
    @Schema(description = "创建用户ID", example = "1")
    private Long userId;

    /**
     * 创建用户信息
     */
    @Schema(description = "创建用户信息")
    private UserVO user;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Serial
    private static final long serialVersionUID = 1L;
}
